DLMS_PREFIX := $(SRCS_PATH)dlms/src/

# You can add more sources here if needed
SRCS +=  $(DLMS_PREFIX)apdu.c             \
         $(DLMS_PREFIX)bytebuffer.c       \
         $(DLMS_PREFIX)bitarray.c         \
         $(DLMS_PREFIX)ciphering.c        \
         $(DLMS_PREFIX)converters.c       \
         $(DLMS_PREFIX)cosem.c            \
         $(DLMS_PREFIX)datainfo.c         \
         $(DLMS_PREFIX)date.c             \
         $(DLMS_PREFIX)dlms.c             \
         $(DLMS_PREFIX)dlmsSettings.c     \
         $(DLMS_PREFIX)gxaes.c            \
         $(DLMS_PREFIX)gxarray.c          \
         $(DLMS_PREFIX)gxget.c            \
         $(DLMS_PREFIX)gxinvoke.c         \
         $(DLMS_PREFIX)gxkey.c            \
         $(DLMS_PREFIX)gxmd5.c            \
         $(DLMS_PREFIX)gxobjects.c        \
         $(DLMS_PREFIX)gxset.c            \
         $(DLMS_PREFIX)gxsha1.c           \
         $(DLMS_PREFIX)gxsha256.c         \
         $(DLMS_PREFIX)gxvalueeventargs.c \
         $(DLMS_PREFIX)helpers.c          \
         $(DLMS_PREFIX)message.c          \
         $(DLMS_PREFIX)objectarray.c      \
         $(DLMS_PREFIX)parameters.c       \
         $(DLMS_PREFIX)replydata.c        \
         $(DLMS_PREFIX)client.c           \
         $(DLMS_PREFIX)variant.c          \

INCLUDES +=

# Define default network settings
CFLAGS += -DNETWORK_ADDRESS=$(default_network_address)
CFLAGS += -DNETWORK_CHANNEL=$(default_network_channel)

# Remove some of the functionality to save memory.
CFLAGS += -DDLMS_IGNORE_WRAPPER
CFLAGS += -DDLMS_IGNORE_PLC
CFLAGS += -DDLMS_IGNORE_NOTIFY
CFLAGS += -DDLMS_IGNORE_SERVER
CFLAGS += -DGX_DLMS_MICROCONTROLLER
CFLAGS += -DDLMS_IGNORE_HIGH_SHA256
CFLAGS += -DDLMS_IGNORE_HIGH_SHA1
CFLAGS += -DDLMS_IGNORE_HIGH_MD5
# CFLAGS += -DDLMS_IGNORE_AES
# CFLAGS += -DDLMS_IGNORE_HIGH_GMAC
CFLAGS += -DDLMS_IGNORE_EXTENDED_REGISTER
CFLAGS += -DDLMS_IGNORE_DEMAND_REGISTER
CFLAGS += -DDLMS_IGNORE_REGISTER_ACTIVATION
# CFLAGS += -DDLMS_IGNORE_PROFILE_GENERIC
# CFLAGS += -DDLMS_IGNORE_CLOCK
CFLAGS += -DDLMS_IGNORE_SCRIPT_TABLE
CFLAGS += -DDLMS_IGNORE_SCHEDULE
CFLAGS += -DDLMS_IGNORE_SPECIAL_DAYS_TABLE
CFLAGS += -DDLMS_IGNORE_ASSOCIATION_SHORT_NAME
CFLAGS += -DDLMS_IGNORE_ASSOCIATION_LOGICAL_NAME
CFLAGS += -DDLMS_IGNORE_SAP_ASSIGNMENT
# CFLAGS += -DDLMS_IGNORE_IMAGE_TRANSFER
CFLAGS += -DDLMS_IGNORE_IEC_LOCAL_PORT_SETUP
CFLAGS += -DDLMS_IGNORE_ACTIVITY_CALENDAR
CFLAGS += -DDLMS_IGNORE_REGISTER_MONITOR
CFLAGS += -DDLMS_IGNORE_ACTION_SCHEDULE
CFLAGS += -DDLMS_IGNORE_IEC_HDLC_SETUP
CFLAGS += -DDLMS_IGNORE_IEC_TWISTED_PAIR_SETUP
CFLAGS += -DDLMS_IGNORE_MBUS_SLAVE_PORT_SETUP
CFLAGS += -DDLMS_IGNORE_UTILITY_TABLES
CFLAGS += -DDLMS_IGNORE_MODEM_CONFIGURATION
CFLAGS += -DDLMS_IGNORE_AUTO_ANSWER
CFLAGS += -DDLMS_IGNORE_AUTO_CONNECT
CFLAGS += -DDLMS_IGNORE_TCP_UDP_SETUP
CFLAGS += -DDLMS_IGNORE_IP4_SETUP
CFLAGS += -DDLMS_IGNORE_IP6_SETUP
CFLAGS += -DDLMS_IGNORE_MAC_ADDRESS_SETUP
CFLAGS += -DDLMS_IGNORE_PPP_SETUP
CFLAGS += -DDLMS_IGNORE_GPRS_SETUP
CFLAGS += -DDLMS_IGNORE_SMTP_SETUP
CFLAGS += -DDLMS_IGNORE_GSM_DIAGNOSTIC
CFLAGS += -DDLMS_IGNORE_REGISTER_TABLE
CFLAGS += -DDLMS_IGNORE_STATUS_MAPPING
CFLAGS += -DDLMS_IGNORE_SECURITY_SETUP
CFLAGS += -DDLMS_IGNORE_DISCONNECT_CONTROL
CFLAGS += -DDLMS_IGNORE_LIMITER
CFLAGS += -DDLMS_IGNORE_MBUS_CLIENT
CFLAGS += -DDLMS_IGNORE_PUSH_SETUP
CFLAGS += -DDLMS_IGNORE_PARAMETER_MONITOR
CFLAGS += -DDLMS_IGNORE_WIRELESS_MODE_Q_CHANNEL
CFLAGS += -DDLMS_IGNORE_MBUS_MASTER_PORT_SETUP
CFLAGS += -DDLMS_IGNORE_ZIG_BEE_SAS_STARTUP
CFLAGS += -DDLMS_IGNORE_ZIG_BEE_SAS_JOIN
CFLAGS += -DDLMS_IGNORE_ZIG_BEE_SAS_APS_FRAGMENTATION
CFLAGS += -DDLMS_IGNORE_ZIG_BEE_NETWORK_CONTROL
CFLAGS += -DDLMS_IGNORE_DATA_PROTECTION
CFLAGS += -DDLMS_IGNORE_ACCOUNT
CFLAGS += -DDLMS_IGNORE_CREDIT
CFLAGS += -DDLMS_IGNORE_CHARGE
CFLAGS += -DDLMS_IGNORE_TOKEN_GATEWAY
CFLAGS += -DDLMS_IGNORE_COMPACT_DATA
CFLAGS += -DDLMS_IGNORE_LLC_SSCS_SETUP
CFLAGS += -DDLMS_IGNORE_PRIME_NB_OFDM_PLC_PHYSICAL_LAYER_COUNTERS
CFLAGS += -DDLMS_IGNORE_PRIME_NB_OFDM_PLC_MAC_SETUP
CFLAGS += -DDLMS_IGNORE_PRIME_NB_OFDM_PLC_MAC_FUNCTIONAL_PARAMETERS
CFLAGS += -DDLMS_IGNORE_PRIME_NB_OFDM_PLC_MAC_COUNTERS
CFLAGS += -DDLMS_IGNORE_PRIME_NB_OFDM_PLC_MAC_NETWORK_ADMINISTRATION_DATA
CFLAGS += -DDLMS_IGNORE_PRIME_NB_OFDM_PLC_APPLICATIONS_IDENTIFICATION
CFLAGS += -DDLMS_IGNORE_ARBITRATOR
CFLAGS += -DDLMS_IGNORE_MALLOC
CFLAGS += -DDLMS_IGNORE_FLOAT32
CFLAGS += -DDLMS_IGNORE_FLOAT64
# Use EPOCH time. This can be used to improve memory usage.
CFLAGS += -DDLMS_USE_EPOCH_TIME
# Use UTC time zone. Read more: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSClock
CFLAGS += -DDLMS_USE_UTC_TIME_ZONE

ifeq ($(target_board), pca10056)
    CFLAGS += -DTARGET_BOARDS_PCA10056    
endif

# Enable application debug prints
APP_PRINTING=yes

# Generic util functions are needed (api.c)
include $(UTIL_PATH)makefile
